package me.zhengjie.modules.inspection.repository;

import io.lettuce.core.dynamic.annotation.Param;
import me.zhengjie.modules.inspection.domain.InspectionItem;
import me.zhengjie.modules.system.domain.DictDetail;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
* @author xuyukun
* @date 2019-07-02
*/
public interface InspectionItemRepository extends JpaRepository<InspectionItem, Long>, JpaSpecificationExecutor {
    @Query("select t from InspectionItem t where objid = ?1")
    List<InspectionItem> findByObjectId(Long  dictId);



    @Query(value = "select t from InspectionItem t where id in (?1) ")
    List<InspectionItem> findByItemIds(List<Long>  itemIds);
}